home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / MacHacksBug / Python 1.5.2c1 / Lib / test / test_time.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2000-06-23  |  1.2 KB  |  54 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 1.5)
  3.  
  4. import time
  5. time.altzone
  6. time.clock()
  7. t = time.time()
  8. time.asctime(time.gmtime(t))
  9. if time.ctime(t) != time.asctime(time.localtime(t)):
  10.     print 'time.ctime(t) <> time.asctime(time.localtime(t))'
  11.  
  12. time.daylight
  13. if long(time.mktime(time.localtime(t))) != long(t):
  14.     print 'time.mktime(time.localtime(t)) <> t'
  15.  
  16. time.sleep(1.2)
  17. tt = time.gmtime(t)
  18. for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'):
  19.     format = ' %' + directive
  20.     
  21.     try:
  22.         time.strftime(format, tt)
  23.     except ValueError:
  24.         0
  25.         0
  26.         ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%')
  27.         print 'conversion specifier:', format, ' failed.'
  28.     except:
  29.         0
  30.  
  31.  
  32. time.timezone
  33. time.tzname
  34.  
  35. try:
  36.     time.asctime(0)
  37. except TypeError:
  38.     0
  39.     0
  40.     ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%')
  41. except:
  42.     0
  43.  
  44.  
  45. try:
  46.     time.mktime((999999, 999999, 999999, 999999, 999999, 999999, 999999, 999999, 999999))
  47. except OverflowError:
  48.     0
  49.     0
  50.     ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%')
  51. except:
  52.     0
  53.  
  54.